AT-NFC  2.1 (win)
AT-NFC kernel set
Macros | Functions
HAL Configuration API

HAL Configuration Interface. More...

Macros

#define KER_CFG_ID_COMPARE_TRACK2_MASK   0x0101
 
#define KER_CFG_COMPARE_TRACK2_MASK_PAN   0x01
 
#define KER_CFG_COMPARE_TRACK2_MASK_EXP_DATE   0x02
 
#define KER_CFG_ID_OVERRIDE_9C_FOR_CVM   0x0102
 
#define KER_CFG_ID_SCRIPT_RESULTS   0x0103
 
#define KER_CFG_ID_OVERRIDE_9C_FOR_RESTR   0x0104
 
#define KER_CFG_ID_OVERRIDE_9C_PER_AID   0x0105
 
#define KER_CFG_ID_APP_CONFIG_ENTRY_ID   0x0106
 
#define KER_CFG_ID_DISABLE_PSE   0x0107
 
#define KER_CFG_ID_OVERRIDE_8A   0x0108
 
#define KER_CFG_ID_ASI   0x0201
 
#define KER_CFG_ID_DEF_APP_LABEL   0x0202
 
#define KER_CFG_ID_LOW_APP_SUPP_VER_RANGE   0x0203
 
#define KER_CFG_ID_HIGH_APP_SUPP_VER_RANGE   0x0204
 
#define KER_CFG_ID_TAC_DENIAL   0x0205
 
#define KER_CFG_ID_TAC_ONLINE   0x0206
 
#define KER_CFG_ID_TAC_DEFAULT   0x0207
 
#define KER_CFG_ID_DEFAULT_TDOL   0x0208
 
#define KER_CFG_ID_DEFAULT_DDOL   0x0209
 
#define KER_CFG_ID_CDA_MODE   0x020A
 
#define KER_CFG_ID_OFFLINE_MODE   0x020B
 
#define KER_CFG_ID_SKIP_PIN_GET_DATA   0x020C
 
#define KER_CFG_ID_TERM_TRAN_LOG_DATA   0x020D
 
#define KER_CFG_ID_TERM_TRAN_LOG_INDEX   0x020E
 
#define KER_CFG_ID_TERM_RAND_SEL_TARGET_PERCENTAGE   0x020F
 
#define KER_CFG_ID_TERM_RAND_SEL_MAX_TARGET_PERCENTAGE   0x0210
 
#define KER_CFG_ID_TERM_RAND_SEL_TRESHOLD   0x0211
 
#define KER_CFG_ID_AEC   0x0212
 
#define KER_CFG_ID_TAED   0x0213
 
#define KER_CFG_ID_CARDHOLDER_CONFIRMATION_SUPP   0x0301
 
#define KER_CFG_ID_FORCE_FIRST_APP_SELECTION   0x0302
 
#define KER_CFG_ID_DEF_APP_LABEL_USAGE   0x0303
 
#define KER_CFG_ID_TRAN_CHAINING_OPTIONS   0x0304
 
#define KER_CFG_ID_PIN_ENTRY_BYPASS   0x0305
 
#define KER_CFG_ID_ISS_SCRIPTS_SIZE_LIMIT   0x0306
 

Functions

KER_BOOL hal_cfg_get_supp_app_list (KER_CTX_PARAM KER_TLV **ppSuppCandList)
 Provides terminal supported applications list for Kernel. More...
 
KER_TLVhal_cfg_get_next_supp_app (KER_CTX_PARAM const KER_TLV *pCurrSuppAID, const KER_TLV *pLastCandAddedToCL)
 Proceed to the next supported app in the list. More...
 
KER_RES hal_cfg_cl_postprocess (KER_CTX_PARAM KER_TLV **ppCandidateList, const KER_TLV *pBlockedAppList, KER_BOOL bForReselect)
 Custom candidate list postprocessing. More...
 
KER_BYTE hal_cfg_lang_autoselect (KER_CTX_PARAM const KER_BYTE *pbtIccSuppLang, KER_BYTE btIccSuppLangLength, KER_BYTE *pbtSelectedLang, KER_BYTE btSelectedLangSize)
 Ckecks for match between ICC and Terminal supported languages and makes autoselection. More...
 
KER_BOOL hal_cfg_get_config (KER_CTX_PARAM const KER_BYTE *pbtAID, KER_INT16U usAIDLen, KER_TLV **ppConfigList)
 Provides common terminal configuration for Kernel. More...
 
KER_BOOL hal_cfg_get_tran_config (KER_CTX_PARAM const KER_BYTE *pbtAID, KER_INT16U usAIDLen, const KER_TLV *pTranDataList, KER_TLV **ppConfigList)
 Provides terminal configuration specific for AID-Transaction data combination for Kernel. More...
 
KER_BOOL hal_cfg_get_config_by_tag (KER_CTX_PARAM const KER_BYTE *pbtAID, KER_INT16U usAIDLen, const KER_BYTE *pbtTag, KER_BYTE btTagLen, KER_BYTE *pbtValue, KER_INT16U *pusValueLen, KER_INT16U usMaxLen)
 Provides common terminal configuration for tag requested. More...
 
KER_BOOL hal_cfg_get_config_by_id (KER_CTX_PARAM const KER_BYTE *pbtAID, KER_INT16U usAIDLen, KER_INT16U usID, KER_BYTE *pbtValue, KER_INT16U *pusValueLen, KER_INT16U usMaxLen)
 Provides terminal configuration which have no emv tag assinged by ID. More...
 
KER_BOOL hal_cfg_set_config_by_id (KER_CTX_PARAM KER_INT16U usID, const KER_BYTE *pbtValue, KER_INT16U usValueLen)
 Keeps trerminal params in "scratch pad". More...
 
KER_BOOL hal_cfg_get_tran_config_by_id (KER_CTX_PARAM KER_TRAN *pTran, const KER_BYTE *pbtAID, KER_INT16U usAIDLen, const KER_TLV *pTranDataList, KER_INT16U usID, KER_BYTE *pbtValue, KER_INT16U *pusValueLen, KER_INT16U usMaxLen)
 Provides terminal configuration specific for AID-Transaction data combination which have no emv tag assinged by ID. More...
 
KER_BOOL hal_cfg_get_custom_tag_by_id (KER_CTX_PARAM KER_INT16U usID, KER_BYTE *pbtValue, KER_INT16U *pusValueLen, KER_INT16U usMaxLen)
 Remapp terminal configuration id to custom tag. More...
 
KER_INT16U hal_cfg_get_id_by_custom_tag (KER_CTX_PARAM const KER_BYTE *pbtTag, KER_INT16U usTagLen)
 Remapp custom tag to configuration ID. More...
 
KER_BOOL hal_cfg_get_is_tran_cash (KER_CTX_PARAM KER_BYTE btTranType)
 Check transaction type (9C) for cash tran (cash or cash disbursement at POS) More...
 
KER_BOOL hal_cfg_get_is_tran_sale (KER_CTX_PARAM KER_BYTE btTranType)
 Check transaction type (9C) for goods and services. More...
 
KER_BOOL hal_cfg_get_is_tran_cashback (KER_CTX_PARAM KER_BYTE btTranType)
 Check transaction type (9C) for cashback. More...
 
KER_BOOL hal_cfg_get_is_tran_manual_cash (KER_CTX_PARAM KER_BYTE btTranType)
 Check transaction type (9C) for manual cash tran (0x17) More...
 
KER_BOOL hal_cfg_get_is_tran_refund (KER_CTX_PARAM KER_BYTE btTranType)
 Check transaction type (9C) for refund (0x20) More...
 
KER_BOOL hal_cfg_get_is_approved_online (KER_CTX_PARAM const KER_BYTE *pbtARC, KER_INT16U usARCLen)
 Check online result by ARC. More...
 
KER_BOOL hal_cfg_get_is_referral_online (KER_CTX_PARAM const KER_BYTE *pbtARC, KER_INT16U usARCLen)
 Check online result by ARC (for referral request) More...
 
KER_BOOL hal_cfg_add_tran_to_term_log_file (KER_CTX_PARAM const KER_BYTE *pbtTLV, KER_INT16U usTLVLen)
 Add to transaction log to prevent split sales. More...
 
KER_BOOL hal_cfg_get_tran_amount_from_term_log_file (KER_CTX_PARAM const KER_BYTE *pbtTLV, KER_INT16U usTLVLen, KER_INT32U *pulPrevTranAmountHI, KER_INT32U *pulPrevTranAmountLO)
 Add to transaction log to prevent split sales. More...
 
KER_BOOL hal_cfg_check_exception_file (KER_CTX_PARAM const KER_BYTE *pbtTLV, KER_INT16U usTLVLen)
 Checks if card appears in terminal exception file (EMV Book 4 6.3.5) More...
 
#define KER_IS_CASH_TRAN(TranType)   (hal_cfg_get_is_tran_cash(KER_CTX TranType))
 
#define KER_IS_SALE_TRAN(TranType)   (hal_cfg_get_is_tran_sale(KER_CTX TranType))
 
#define KER_IS_CASHBACK_TRAN(TranType)   (hal_cfg_get_is_tran_cashback(KER_CTX TranType))
 
#define KER_IS_MANUAL_CASH_TRAN(TranType)   (hal_cfg_get_is_tran_manual_cash(KER_CTX TranType))
 
#define KER_IS_REFUND_TRAN(TranType)   (hal_cfg_get_is_tran_refund(KER_CTX TranType))
 
#define KER_IS_APPROVED_ONLINE(Arc, ArcLen)   (hal_cfg_get_is_approved_online(KER_CTX Arc, ArcLen))
 
#define KER_IS_REFERRAL_ONLINE(Arc, ArcLen)   (hal_cfg_get_is_referral_online(KER_CTX Arc, ArcLen))
 

Detailed Description

HAL Configuration Interface.

This functions should be implemented by terminal application

Macro Definition Documentation

◆ KER_CFG_COMPARE_TRACK2_MASK_EXP_DATE

#define KER_CFG_COMPARE_TRACK2_MASK_EXP_DATE   0x02

\ ( )

◆ KER_CFG_COMPARE_TRACK2_MASK_PAN

#define KER_CFG_COMPARE_TRACK2_MASK_PAN   0x01

\ ( )

◆ KER_CFG_ID_AEC

#define KER_CFG_ID_AEC   0x0212

Set this parameter (Allow Expired Card) to setup data expired card acceptance (0 - disable, 1 - enable) Usage: Contact, C-2, C-3, C-4, C-7, MIR Optional, 1 bytes length binary value

◆ KER_CFG_ID_APP_CONFIG_ENTRY_ID

#define KER_CFG_ID_APP_CONFIG_ENTRY_ID   0x0106

Get this parameter to obtain app configuration entry ID for partucular AIDs. Usage: Contact, HAL This is optional, 1 byte length value

◆ KER_CFG_ID_ASI

#define KER_CFG_ID_ASI   0x0201

Set this parameter as ASI (application selection indicator) for appropriate supported AID. Usage: Contact, HAL This is optional, 1 byte length value. Set it to nonzero value to indicate partial AID match support.

◆ KER_CFG_ID_CARDHOLDER_CONFIRMATION_SUPP

#define KER_CFG_ID_CARDHOLDER_CONFIRMATION_SUPP   0x0301

Set this parameter to nonzero value to allow add candidates that requires cardholder confirmation. Usage: Contact, HAL Zero value (default) means that such applications will be removed from candidate list. This is optional, 1 byte length value.

◆ KER_CFG_ID_CDA_MODE

#define KER_CFG_ID_CDA_MODE   0x020A

Set this parameter to define CDA type Usage: Contact Optional, 1byte length binary value. Value ARQC GAC2/TC 0x01 + + (default) 0x02 + - 0x03 - - 0x04 - +

◆ KER_CFG_ID_COMPARE_TRACK2_MASK

#define KER_CFG_ID_COMPARE_TRACK2_MASK   0x0101

Set this parameter to force compare track2 (tag 57) value against PAN (tag 5A) and expiry date (tag 5F24). (mandatory for MasterCard contact cards) Usage: Contact, HAL This is 1 byte length bitmask Set bit KER_CFG_COMPARE_TRACK2_MASK_PAN to force compare track2 and PAN (abort transaction in case of mismatch) Set bit KER_CFG_COMPARE_TRACK2_MASK_EXP_DATE to force compare track2 and expiry date (abort transaction in case of mismatch) Other bits - rfu

◆ KER_CFG_ID_DEF_APP_LABEL

#define KER_CFG_ID_DEF_APP_LABEL   0x0202

Set this parameter to use as application default label, if tag 50 missed. Usage: Contact, HAL Optional, up to 16 bytes length binary value. Enable application default label usage by KER_CFG_ID_DEF_APP_LABEL_USAGE

◆ KER_CFG_ID_DEF_APP_LABEL_USAGE

#define KER_CFG_ID_DEF_APP_LABEL_USAGE   0x0303

Set this parameter to enable application default label usage by setting KER_CFG_ID_DEF_APP_LABEL param Usage: Contact, HAL This is optional, 1 byte length value. Set it to nonzero value to indicate default application labels support.

◆ KER_CFG_ID_DEFAULT_DDOL

#define KER_CFG_ID_DEFAULT_DDOL   0x0209

Set this parameter to define Default DDOL. Usage: Contact, HAL Optional, variable length binary value.

◆ KER_CFG_ID_DEFAULT_TDOL

#define KER_CFG_ID_DEFAULT_TDOL   0x0208

Set this parameter to define Default TDOL. Usage: Contact, HAL Optional, variable length binary value.

◆ KER_CFG_ID_DISABLE_PSE

#define KER_CFG_ID_DISABLE_PSE   0x0107

Set this parameter to disable PSE for cl build Usage: Contact This is optional, 1 byte length value (0 means PSE enabled, other - disabled)

◆ KER_CFG_ID_FORCE_FIRST_APP_SELECTION

#define KER_CFG_ID_FORCE_FIRST_APP_SELECTION   0x0302

Set this parameter to force first application selection from candidate list despite of confirm required bit in API. Usage: Contact, HAL This is optional, 1 byte length value. Set it to nonzero value to force first application selection from candidate list

Warning
It is strongly recommended to use it in conjunction with KER_CFG_ID_CARDHOLDER_CONFIRMATION_SUPP set to zero value

◆ KER_CFG_ID_HIGH_APP_SUPP_VER_RANGE

#define KER_CFG_ID_HIGH_APP_SUPP_VER_RANGE   0x0204

Set this parameter to define highest value for application supported version range. Usage: Contact, C-2, C-4, MIR, HAL Optional, 2 bytes length binary value (most significant byte first). Use in conjunction with KER_CFG_ID_LOW_APP_SUPP_VER_RANGE

◆ KER_CFG_ID_ISS_SCRIPTS_SIZE_LIMIT

#define KER_CFG_ID_ISS_SCRIPTS_SIZE_LIMIT   0x0306

Provides a script size limit Defines limit in bytes, 0-9999. Usage: Contact, C-3, HAL Optional, (0 - unlimited, by default)

◆ KER_CFG_ID_LOW_APP_SUPP_VER_RANGE

#define KER_CFG_ID_LOW_APP_SUPP_VER_RANGE   0x0203

Set this parameter to define lowest value for application supported version range. Usage: Contact, C-2, C-4, MIR, HAL Optional, 2 bytes length binary value (most significant byte first). Use in conjunction with KER_CFG_ID_HIGH_APP_SUPP_VER_RANGE

◆ KER_CFG_ID_OFFLINE_MODE

#define KER_CFG_ID_OFFLINE_MODE   0x020B

Set this parameter to define Offline processing type Usage: Contact, HAL Optional, 1byte length binary value.

◆ KER_CFG_ID_OVERRIDE_8A

#define KER_CFG_ID_OVERRIDE_8A   0x0108

Set this parameter to override ARC (tag 8A) value, used to obtain host transaction disposition. Usage: Contact This is optional, 1 byte length value

◆ KER_CFG_ID_OVERRIDE_9C_FOR_CVM

#define KER_CFG_ID_OVERRIDE_9C_FOR_CVM   0x0102

Set this parameter to override transaction type (tag 9C) value, used during cardholder verification processing. Usage: Contact, C-2, C-4, MIR, HAL This is optional, 1 byte length value

◆ KER_CFG_ID_OVERRIDE_9C_FOR_RESTR

#define KER_CFG_ID_OVERRIDE_9C_FOR_RESTR   0x0104

Set this parameter to override transaction type (tag 9C) value, used during processing restrictions. Usage: Contact, C-2, C-3, C-4, MIR, HAL This is optional, 1 byte length value

◆ KER_CFG_ID_OVERRIDE_9C_PER_AID

#define KER_CFG_ID_OVERRIDE_9C_PER_AID   0x0105

Set this parameter to override transaction type (tag 9C) value for partucular AIDs. Usage: Contact, Entry Point, HAL This is optional, 1 byte length value

◆ KER_CFG_ID_PIN_ENTRY_BYPASS

#define KER_CFG_ID_PIN_ENTRY_BYPASS   0x0305

Set this parameter to enable pin entry bypass. Otherwise pin entry bypass will be trated as failure Usage: Contact, HAL This is optional, 1 byte length value. Set it to nonzero value to indicate pin entry bypass support

◆ KER_CFG_ID_SCRIPT_RESULTS

#define KER_CFG_ID_SCRIPT_RESULTS   0x0103

Script results maintained by kernel. Usage: Contact, HAL Use this ID just for remapping to some custom tags in hal_cfg_get_custom_tag_by_id and hal_cfg_get_id_by_custom_tag.

◆ KER_CFG_ID_SKIP_PIN_GET_DATA

#define KER_CFG_ID_SKIP_PIN_GET_DATA   0x020C

Set this parameter to skip GET_DATA call for pin try count. Usage: Contact, HAL Optional, 1byte length binary value. (0 - call GET_DATA, otherwise - skip)

◆ KER_CFG_ID_TAC_DEFAULT

#define KER_CFG_ID_TAC_DEFAULT   0x0207

Set this parameter to define TAC-Default. Usage: Contact, C-2, C-4, MIR, HAL Optional, 5 bytes length binary value.

◆ KER_CFG_ID_TAC_DENIAL

#define KER_CFG_ID_TAC_DENIAL   0x0205

Set this parameter to define TAC-Denial. Usage: Contact, C-2, C-4, MIR, HAL Optional, 5 bytes length binary value.

◆ KER_CFG_ID_TAC_ONLINE

#define KER_CFG_ID_TAC_ONLINE   0x0206

Set this parameter to define TAC-Online. Usage: Contact, C-2, C-4, MIR, HAL Optional, 5 bytes length binary value.

◆ KER_CFG_ID_TAED

#define KER_CFG_ID_TAED   0x0213

Set this parameter (Treshold Application Expiration Date) to setup appropriate treshold Usage: Contact, C-2, C-3, C-4, C-7, MIR Optional, 3 bytes length (YYMMDD) binary value

◆ KER_CFG_ID_TERM_RAND_SEL_MAX_TARGET_PERCENTAGE

#define KER_CFG_ID_TERM_RAND_SEL_MAX_TARGET_PERCENTAGE   0x0210

Maximum Target Percentage to be Used for Biased Random Selection (0-99) not less than KER_CFG_ID_TERM_RAND_SEL_TARGET_PERCENTAGE Usage: Contact, HAL Optional, 0 by default.

◆ KER_CFG_ID_TERM_RAND_SEL_TARGET_PERCENTAGE

#define KER_CFG_ID_TERM_RAND_SEL_TARGET_PERCENTAGE   0x020F

Target Percentage to be Used for Random Selection (0-99) Usage: Contact, HAL Optional, 0 by default.

◆ KER_CFG_ID_TERM_RAND_SEL_TRESHOLD

#define KER_CFG_ID_TERM_RAND_SEL_TRESHOLD   0x0211

Threshold Value for Biased Random Selection (less than terminal floor limit 9F1B) Usage: Contact, HAL Optional, 4bytes length binary value (most significant byte first).

◆ KER_CFG_ID_TERM_TRAN_LOG_DATA

#define KER_CFG_ID_TERM_TRAN_LOG_DATA   0x020D

Set this parameter to define transaction tags, nessesary for terminal transaction log Usage: Contact, HAL Empty if terminal transaction log not configured.

◆ KER_CFG_ID_TERM_TRAN_LOG_INDEX

#define KER_CFG_ID_TERM_TRAN_LOG_INDEX   0x020E

Set this parameter to define transaction tags, used as index, to search in transaction log Usage: Contact, HAL Empty if terminal transaction log not configured.

◆ KER_CFG_ID_TRAN_CHAINING_OPTIONS

#define KER_CFG_ID_TRAN_CHAINING_OPTIONS   0x0304

Set this parameter to enable transaction chaining. Usage: Contact, HAL This is optional, 1 byte length value: KER_CFG_TR_CHAINING_FULL_RESTART (default) - full transaction restart - mode used for EMVCo approval KER_CFG_TR_CHAINING_REUSE_FINAL_CL - skip cl build - use final cl prov prev transaction KER_CFG_TR_CHAINING_REUSE_INITIAL_CL - skip cl build - use initial cl prov prev transaction

Warning
All modes except KER_CFG_TR_CHAINING_FULL_RESTART not certified by EMVCo

◆ KER_IS_APPROVED_ONLINE

#define KER_IS_APPROVED_ONLINE (   Arc,
  ArcLen 
)    (hal_cfg_get_is_approved_online(KER_CTX Arc, ArcLen))

Check online result by ARC

◆ KER_IS_CASH_TRAN

#define KER_IS_CASH_TRAN (   TranType)    (hal_cfg_get_is_tran_cash(KER_CTX TranType))

Check transaction type (9C) for cash tran (cash or cash disbursement at POS)

◆ KER_IS_CASHBACK_TRAN

#define KER_IS_CASHBACK_TRAN (   TranType)    (hal_cfg_get_is_tran_cashback(KER_CTX TranType))

Check transaction type (9C) for cashback

◆ KER_IS_MANUAL_CASH_TRAN

#define KER_IS_MANUAL_CASH_TRAN (   TranType)    (hal_cfg_get_is_tran_manual_cash(KER_CTX TranType))

Check transaction type (9C) for manual cash

◆ KER_IS_REFERRAL_ONLINE

#define KER_IS_REFERRAL_ONLINE (   Arc,
  ArcLen 
)    (hal_cfg_get_is_referral_online(KER_CTX Arc, ArcLen))

Check online result by ARC

◆ KER_IS_REFUND_TRAN

#define KER_IS_REFUND_TRAN (   TranType)    (hal_cfg_get_is_tran_refund(KER_CTX TranType))

Check transaction type (9C) for refund

◆ KER_IS_SALE_TRAN

#define KER_IS_SALE_TRAN (   TranType)    (hal_cfg_get_is_tran_sale(KER_CTX TranType))

Check transaction type (9C) for goods and services

Function Documentation

◆ hal_cfg_add_tran_to_term_log_file()

KER_BOOL hal_cfg_add_tran_to_term_log_file ( KER_CTX_PARAM const KER_BYTE pbtTLV,
KER_INT16U  usTLVLen 
)

Add to transaction log to prevent split sales.

Parameters
[in]pbtTLVTLV buffer with tran data (at least tags 5A, 5F34, 9A, 81), tag list set by KER_CFG_ID_TERM_TRAN_LOG_DATA
[in]usTLVLenthe size of pbtTLV
Returns
KER_TRUE - transaction added to terminal transaction log.
KER_FALSE - failure.

This function is used to prevent split sales

◆ hal_cfg_check_exception_file()

KER_BOOL hal_cfg_check_exception_file ( KER_CTX_PARAM const KER_BYTE pbtTLV,
KER_INT16U  usTLVLen 
)

Checks if card appears in terminal exception file (EMV Book 4 6.3.5)

Parameters
[in]pbtTLVTLV buffer with card data (tags 5A, 5F34)
[in]usTLVLenthe size of pbtTLV
Returns
KER_TRUE - card appears in terminal exception file
KER_FALSE - card not appears in terminal exception file or terminal exception file not configured.

This function is used to support terminal exception file

◆ hal_cfg_cl_postprocess()

KER_RES hal_cfg_cl_postprocess ( KER_CTX_PARAM KER_TLV **  ppCandidateList,
const KER_TLV pBlockedAppList,
KER_BOOL  bForReselect 
)

Custom candidate list postprocessing.

Parameters
[in,out]ppCandidateListpointer to Candidate list built
[in]pBlockedAppListblocked app list (for custom scheme processing)
[in]bForReselectPass KER_TRUE if this function called after removing previosly selected app from cl. In that case you may skip secondary aids processing as it was already performed on previous stage. Pass KER_FALSE if this function called after initial call to kerBuildCL
Returns
KER_OK - Ok.
KER_ERR_BUILD_CL_CARD_BLOCKED - Scheme specific error - abort transaction, fallback disabled (card blocked)
KER_ERR_COMMON_ABORT_FALLBACK_DISABLED - Scheme specific error - abort transaction, fallback disabled (app blocked)
Other - failure, abort transaction.

Terminal should implement this function to optionally support custom cl postprocessing (secondary AIDs functionality for PSE bult list (see NDC specification for details), MIR cobranding rules, MC blocked app processing, etc...) Candidate list built by PSE contains 4F tags with AID value, candidate list built by app list selection contains 84 tags with AID value.

Warning
It is Terminal Application responsablity to use (as it may cause certification issues) and trace non-standard behaviour.
Any candidates, removed from cl should be released by Terminal Application internally.

◆ hal_cfg_get_config()

KER_BOOL hal_cfg_get_config ( KER_CTX_PARAM const KER_BYTE pbtAID,
KER_INT16U  usAIDLen,
KER_TLV **  ppConfigList 
)

Provides common terminal configuration for Kernel.

Parameters
[in]pbtAIDapp aid (optional, set KER_NULL to request general terminal config)
[in]usAIDLenThe btAID length
[out]ppConfigListPointer to allocated TLV container list with terminal configuration
Returns
KER_TRUE Success.
KER_FALSE Failure.

Terminal should use kerContTlvCreateByTag or kerContTlvCreateByTLV to create tlv container list

Pass pbtAID parameter to obtain application related configuration in addition to general terminal configuration. Actual parameters should be placed last in list.

Warning
Allocated list should be released by kerContTlvListRelease by kernel.

◆ hal_cfg_get_config_by_id()

KER_BOOL hal_cfg_get_config_by_id ( KER_CTX_PARAM const KER_BYTE pbtAID,
KER_INT16U  usAIDLen,
KER_INT16U  usID,
KER_BYTE pbtValue,
KER_INT16U pusValueLen,
KER_INT16U  usMaxLen 
)

Provides terminal configuration which have no emv tag assinged by ID.

Parameters
[in]pbtAIDapp aid (optional, set KER_NULL to request general terminal config)
[in]usAIDLenThe btAID length
[in]usIDrequested value ID
[out]pbtValueBuffer to obtain requested value (optional, set KER_NULL if you don't need it)
[out]pusValueLenBuffer to obtain requested value length
[in]usMaxLenSize of pbtValue buffer
Returns
KER_TRUE Success.
KER_FALSE Failure.

This function is used to request terminal configuration which have no emv tag assinged by ID.

Pass pbtAID parameter to obtain application related configuration. If appropriate parameter not found in application releated configuration - take it from general terminal configuration.

Pass pbtValue as KER_NULL to obtain estimated buffer length through pusValueLen

◆ hal_cfg_get_config_by_tag()

KER_BOOL hal_cfg_get_config_by_tag ( KER_CTX_PARAM const KER_BYTE pbtAID,
KER_INT16U  usAIDLen,
const KER_BYTE pbtTag,
KER_BYTE  btTagLen,
KER_BYTE pbtValue,
KER_INT16U pusValueLen,
KER_INT16U  usMaxLen 
)

Provides common terminal configuration for tag requested.

Parameters
[in]pbtAIDapp aid (optional, set KER_NULL to request general terminal config)
[in]usAIDLenThe btAID length
[in]pbtTagrequested tag value
[in]btTagLenpbtTag value length
[out]pbtValueBuffer to obtain requested tag value (optional, set KER_NULL if you don't need it)
[out]pusValueLenBuffer to obtain requested tag value length
[in]usMaxLenSize of pbtValue buffer
Returns
KER_TRUE Success.
KER_FALSE Failure.

This function is used (at the moment) during cl build for additional terminal capabilities request

Pass pbtAID parameter to obtain application related configuration. If appropriate parameter not found in application releated configuration - take it from general terminal configuration.

Pass pbtValue as KER_NULL to obtain estimated buffer length through pusValueLen

◆ hal_cfg_get_custom_tag_by_id()

KER_BOOL hal_cfg_get_custom_tag_by_id ( KER_CTX_PARAM KER_INT16U  usID,
KER_BYTE pbtValue,
KER_INT16U pusValueLen,
KER_INT16U  usMaxLen 
)

Remapp terminal configuration id to custom tag.

Parameters
[in]usIDrequested value ID
[out]pbtValueBuffer to obtain appropriate tag value (optional, set KER_NULL if you don't need it)
[out]pusValueLenBuffer to obtain requested tag value length
[in]usMaxLenSize of pbtValue buffer
Returns
KER_TRUE Success.
KER_FALSE Failure.

This function is used for remapping terminal configuration which have no emv tag assinged to configurable custom tags.

Pass pbtValue as KER_NULL to obtain estimated buffer length through pusValueLen

◆ hal_cfg_get_id_by_custom_tag()

KER_INT16U hal_cfg_get_id_by_custom_tag ( KER_CTX_PARAM const KER_BYTE pbtTag,
KER_INT16U  usTagLen 
)

Remapp custom tag to configuration ID.

Parameters
[in]pbtTagBuffer to obtain appropriate tag value (optional, set KER_NULL if you don't need it)
[in]usTagLenBuffer to obtain requested tag value length
Returns
0 - failure (invalid parameter or such tag not remapped).
Otherwise - ID of appropriate configuration parameter.

This function is used for remapping custom tags to terminal configuration which have no emv tag assinged.

◆ hal_cfg_get_is_approved_online()

KER_BOOL hal_cfg_get_is_approved_online ( KER_CTX_PARAM const KER_BYTE pbtARC,
KER_INT16U  usARCLen 
)

Check online result by ARC.

Parameters
[in]pbtARCthe buffer with ARC (2 bytes)
[in]usARCLenthe size of pbtARC
Returns
KER_TRUE - condition fulfilled.
KER_FALSE - condition not fulfilled.

This function is used to check online result by ARC

◆ hal_cfg_get_is_referral_online()

KER_BOOL hal_cfg_get_is_referral_online ( KER_CTX_PARAM const KER_BYTE pbtARC,
KER_INT16U  usARCLen 
)

Check online result by ARC (for referral request)

Parameters
[in]pbtARCthe buffer with ARC (2 bytes)
[in]usARCLenthe size of pbtARC
Returns
KER_TRUE - condition fulfilled.
KER_FALSE - condition not fulfilled.

This function is used to check online result by ARC for referral request

◆ hal_cfg_get_is_tran_cash()

KER_BOOL hal_cfg_get_is_tran_cash ( KER_CTX_PARAM KER_BYTE  btTranType)

Check transaction type (9C) for cash tran (cash or cash disbursement at POS)

Parameters
[in]btTranTypethe value of transaction type (9C) tag
Returns
KER_TRUE - condition fulfilled.
KER_FALSE - condition not fulfilled.

This function is used to check if transaction type (9C) is for cash tran

◆ hal_cfg_get_is_tran_cashback()

KER_BOOL hal_cfg_get_is_tran_cashback ( KER_CTX_PARAM KER_BYTE  btTranType)

Check transaction type (9C) for cashback.

Parameters
[in]btTranTypethe value of transaction type (9C) tag
Returns
KER_TRUE - condition fulfilled.
KER_FALSE - condition not fulfilled.

This function is used to check if transaction type (9C) is for cashback

◆ hal_cfg_get_is_tran_manual_cash()

KER_BOOL hal_cfg_get_is_tran_manual_cash ( KER_CTX_PARAM KER_BYTE  btTranType)

Check transaction type (9C) for manual cash tran (0x17)

Parameters
[in]btTranTypethe value of transaction type (9C) tag
Returns
KER_TRUE - condition fulfilled.
KER_FALSE - condition not fulfilled.

This function is used to check if transaction type (9C) is for manual cash tran

◆ hal_cfg_get_is_tran_refund()

KER_BOOL hal_cfg_get_is_tran_refund ( KER_CTX_PARAM KER_BYTE  btTranType)

Check transaction type (9C) for refund (0x20)

Parameters
[in]btTranTypethe value of transaction type (9C) tag
Returns
KER_TRUE - condition fulfilled.
KER_FALSE - condition not fulfilled.

This function is used to check if transaction type (9C) is for refund

◆ hal_cfg_get_is_tran_sale()

KER_BOOL hal_cfg_get_is_tran_sale ( KER_CTX_PARAM KER_BYTE  btTranType)

Check transaction type (9C) for goods and services.

Parameters
[in]btTranTypethe value of transaction type (9C) tag
Returns
KER_TRUE - condition fulfilled.
KER_FALSE - condition not fulfilled.

This function is used to check if transaction type (9C) is for goods and services

◆ hal_cfg_get_next_supp_app()

KER_TLV* hal_cfg_get_next_supp_app ( KER_CTX_PARAM const KER_TLV pCurrSuppAID,
const KER_TLV pLastCandAddedToCL 
)

Proceed to the next supported app in the list.

Parameters
[in]pCurrSuppAIDPointer to just processed supported candidate (9F06) from supported aids list, returned by hal_cfg_get_supp_app_list.
[in]pLastCandAddedToCLPointer to last candidate added to cl (9F06) from supported aids list, returned by hal_cfg_get_supp_app_list.
Returns
Pointer to the next candidate to check from pCurrSuppAID sublist.

Terminal should override this macro to optionally support secondary AIDs functionality (see NDC specification for details) If Secondary AIDs not supported just return next candidate after pCurrSuppAID in supported aids list

Warning
It is Terminal Application responsablity to use (as it may cause certification issues) and trace non-standard behaviour.

◆ hal_cfg_get_supp_app_list()

KER_BOOL hal_cfg_get_supp_app_list ( KER_CTX_PARAM KER_TLV **  ppSuppCandList)

Provides terminal supported applications list for Kernel.

Parameters
[out]ppSuppCandListPointer to allocated list with candidates, supported by Terminal.
Returns
KER_TRUE Success.
KER_FALSE Failure.

Terminal should allocate tlv container list one per each AID supported and pass it to the Kernel. Each cantainer should contain 9F06 as supported aid and optional ASI value (1 byte non-zero for partial match allowed)

Warning
Allocated list should be released by kerContTlvListRelease externally if hal_cfg_get_supp_app_list was called externally by Terminal Application, or internally by the kernel if hal_cfg_get_supp_app_list was called internally by kerBuildCL

◆ hal_cfg_get_tran_amount_from_term_log_file()

KER_BOOL hal_cfg_get_tran_amount_from_term_log_file ( KER_CTX_PARAM const KER_BYTE pbtTLV,
KER_INT16U  usTLVLen,
KER_INT32U pulPrevTranAmountHI,
KER_INT32U pulPrevTranAmountLO 
)

Add to transaction log to prevent split sales.

Parameters
[in]pbtTLVTLV buffer with tran data (at least tags 5A, 5F34, 9A, 81), tag list set by KER_CFG_ID_TERM_TRAN_LOG_DATA
[in]usTLVLenthe size of pbtTLV
[out]pulPrevTranAmountHIprevious transaction amount from terminal log file high 4 bytes
[out]pulPrevTranAmountLOprevious transaction amount from terminal log file low 4 bytes
Returns
KER_TRUE - transaction located in terminal transaction log.
KER_FALSE - failure.

This function is used to prevent split sales

◆ hal_cfg_get_tran_config()

KER_BOOL hal_cfg_get_tran_config ( KER_CTX_PARAM const KER_BYTE pbtAID,
KER_INT16U  usAIDLen,
const KER_TLV pTranDataList,
KER_TLV **  ppConfigList 
)

Provides terminal configuration specific for AID-Transaction data combination for Kernel.

Parameters
[in]pbtAIDapp aid (optional, set KER_NULL to request general terminal config)
[in]usAIDLenThe btAID length
[in]pTranDataListTransaction data passed to kernel
[out]ppConfigListPointer to allocated TLV container list with terminal configuration
Returns
KER_TRUE Success.
KER_FALSE Failure.

Terminal should use kerContTlvCreateByTag or kerContTlvCreateByTLV to create tlv container list

Pass pbtAID parameter to obtain application-transaction combination related configuration. Actual parameters should be placed last in list.

Warning
Allocated list should be released by kerContTlvListRelease by kernel.

◆ hal_cfg_get_tran_config_by_id()

KER_BOOL hal_cfg_get_tran_config_by_id ( KER_CTX_PARAM KER_TRAN pTran,
const KER_BYTE pbtAID,
KER_INT16U  usAIDLen,
const KER_TLV pTranDataList,
KER_INT16U  usID,
KER_BYTE pbtValue,
KER_INT16U pusValueLen,
KER_INT16U  usMaxLen 
)

Provides terminal configuration specific for AID-Transaction data combination which have no emv tag assinged by ID.

Parameters
[in]pTranTransaction handle (optional, set KER_NULL if you don't need to obtain transaction params to define parameter localtion)
[in]pbtAIDapp aid (optional, set KER_NULL to request general terminal config)
[in]usAIDLenThe btAID length
[in]pTranDataListTransaction data passed to kernel
[in]usIDrequested value ID
[out]pbtValueBuffer to obtain requested tag value (optional, set KER_NULL if you don't need it)
[out]pusValueLenBuffer to obtain requested tag value length
[in]usMaxLenSize of pbtValue buffer
Returns
KER_TRUE Success.
KER_FALSE Failure.

This function is used to request terminal configuration which have no emv tag assinged by ID.

Pass pbtAID parameter to obtain application related configuration. If appropriate parameter not found in application releated configuration - take it from general terminal configuration.

Pass pbtValue as KER_NULL to obtain estimated buffer length through pusValueLen

◆ hal_cfg_lang_autoselect()

KER_BYTE hal_cfg_lang_autoselect ( KER_CTX_PARAM const KER_BYTE pbtIccSuppLang,
KER_BYTE  btIccSuppLangLength,
KER_BYTE pbtSelectedLang,
KER_BYTE  btSelectedLangSize 
)

Ckecks for match between ICC and Terminal supported languages and makes autoselection.

Parameters
[in]pbtIccSuppLangBuffer with languages, supported by ICC in priority order (2 bytes per lang)
[in]btIccSuppLangLengthLength of pbtIccSuppLang.
[out]pbtSelectedLangBuffer to obtain autoselected lang (2 bytes expected).
[in]btSelectedLangSizeSize of pbtSelectedLang.
Returns
Count of bytes, stored in pbtSelectedLang (0 - if no match found, otherwise 2 expected)

◆ hal_cfg_set_config_by_id()

KER_BOOL hal_cfg_set_config_by_id ( KER_CTX_PARAM KER_INT16U  usID,
const KER_BYTE pbtValue,
KER_INT16U  usValueLen 
)

Keeps trerminal params in "scratch pad".

Parameters
[in]usIDvalue ID to set
[in]pbtValueValue to set
[in]usValueLenvalue length
Returns
KER_TRUE Success.
KER_FALSE Failure.

This function is used to update terminal configuration which has no emv tag assinged by ID.

Pass pbtAID parameter to update application related configuration.